package com.bw.user.entity;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.math.BigDecimal;
import java.io.Serializable;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * 
 * 
 * @author Hao_YunKai
 * @email 2745578447@qq.com
 * @date 2022-02-22 11:22:28
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("order_info")
public class OrderInfoEntity implements Serializable {
	private static final long serialVersionUID = 1L;

	/**
	 * 
	 */
	@TableId
	@JsonSerialize(using = ToStringSerializer.class)
	private Long id;
	/**
	 * 用户id
	 */
	private Long userId;
	/**
	 * 商品id
	 */
	private Long goodsId;
	/**
	 * 收获地址id
	 */
	private Long deliveryAddrId;
	/**
	 * 冗余过来的商品名称
	 */
	private String goodsName;
	/**
	 * 商品数量
	 */
	private Integer goodsCount;
	/**
	 * 商品单价
	 */
	private BigDecimal goodsPrice;
	/**
	 * 1.pc 2.android 3.ios
	 */
	private Integer goodsChannel;
	/**
	 * 订单状态：0新建未支付，1已支付，2已发货，3已收货，4已退款，5已完成
	 */
	private Integer status;
	/**
	 * 订单创建时间
	 */
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
	@JSONField(format = "yyyy-MM-dd HH:mm:ss")
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	private Date createDate;
	/**
	 * 支付时间
	 */
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
	@JSONField(format = "yyyy-MM-dd HH:mm:ss")
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	private Date payDate;

}
